#include <16F917.h>
#device *=16
#device adc=8

#FUSES NOWDT                 	//No Watch Dog Timer
#FUSES INTRC_IO              	//Internal RC Osc, no CLKOUT
#FUSES PUT                   	//Power Up Timer
#FUSES NOPROTECT             	//Code not protected from reading
#FUSES MCLR                		//Master Clear pin used for I/O
#FUSES NOCPD                 	//No EE protection
#FUSES NOBROWNOUT            	//No brownout reset
#FUSES NOIESO                	//Internal External Switch Over mode disabled
#FUSES NOFCMEN               	//Fail-safe clock monitor disabled
#FUSES NODEBUG               	//No Debug mode for ICD

#use delay(clock=8000000)
#use fast_io(C)


//ASC
#define		ASC										PIN_A5
#define 	SET_PIN_ACTIVACION_SENSORES_CRUCE		output_high(ASC)
#define 	CLEAR_PIN_ACTIVACION_SENSORES_CRUCE		output_low (ASC)
//SLB
#define		SLB										PIN_E1
#define		SET_PIN_SENSORES_LINEA_BLANCO			output_high(SLB)
#define		CLEAR_PIN_SENSORES_LINEA_BLANCO			output_low (SLB)

#define		DR										PIN_E2
#define		SET_PIN_DISTANCIA_RECORRIDA				output_high(DR)
#define		CLEAR_PIN_DISTANCIA_RECORRIDA			output_low (DR)

#define		ESTADO_INICIO			0
#define		ESTADO_DEVOLVER_T		1
#define		ESTADO_CRUZAR_DERECHA 	2
#define		ESTADO_CRUZAR_IZQUIERDA	3
#define		COGER_LATA				4
#define		ESTADO_ADELANTE			5
#define		DESCARGAR_LATA			6

int8	Bandera_descarga = 0;



